create database [Bakery]
go
use [Bakery]
go


insert into LOAI values ('L01','CupCake')
insert into LOAI values ('L02','Tiramisu')
insert into LOAI values ('L03','Cream Cake')

insert into NHASX values ('SX01','ABC','Q6',0835097802)
insert into NHASX values ('SX02','Girval','Q5',0837623349)

insert into SANPHAM values ('CK01', 'CupCake Strawberry','CupCake',15000,'SX01',50)
create table SANPHAM (
  MaSP varchar(10) ,
  TenSP varchar(50) ,
  LoaiSP varchar(10) ,
  Dongia int ,
  NhaSX varchar(10),
  Soluong int
)
go
create table LOAI (
	MaLoai varchar(10) ,
	TenLoai varchar(30)
)
go

create table NHASX (
	MaSX varchar(10) ,
	TenNSX varchar(100) ,
	DiaChi varchar (100) ,
	SDT varchar(15) 
)
go


create table HOADON(
	MaHD varchar(10),
	NgayHD datetime,
	TongTien int
)
go

create table CTHD(
	MaHD varchar(10) ,
	MaSP varchar (10) ,
	SoLuong int ,
	ThanhTien int
)
go
 


